<template>
  <div>
    <swiper :options="swiperOption" ref="mySwiper" class="home-banner">
      <!-- slides -->
      <swiper-slide v-for="(item, index) in slides" :key="index">
        <img :src="item.image" />
      </swiper-slide>
      <!-- Optional controls -->
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
export default {
  name: 'BannerSlide',
  props: {
    slides: {
      type: Array,
      default: () => []
    }
  },
  data () {
    return {
      swiperOption: {}
    }
  }
}
</script>

<style lang="scss" scoped>
.home-banner {
  img {
    display: block;
    width: 100%;
  }
}
</style>
